package ee.project;

public class Stopwatch {

	private long startTime;
	private long endTime;

	public Stopwatch start() {
		startTime = System.currentTimeMillis();
		return this;
	}

	public void stop() {
		endTime = System.currentTimeMillis();
	}

	public int getTimeElapsed() {
		return (int) (endTime - startTime);
	}

	public Stopwatch reset() {
		startTime = 0;
		return this;
	}
}
